package com.spring2.dao.impl;

import com.spring2.dao.UserDao;
import com.spring2.pojo.User;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

//@Component("dao")
//@Component
@Repository
public class UserDaoImpl implements UserDao {
    @Override
    public User getById(Integer id) {
        // 应给查询数据库，这里采用模拟的方式
        User user = new User();
        user.setId(1);
        user.setName("张三");
        user.setPwd("12345678");
        user.setAge(18);
        return user;
    }
}
